<extend name="Public/base" />
<block name='style'>


    <link href="__STATIC__/iCheck/skins/flat/green.css" rel="stylesheet">
    <link href="__STATIC__/select2/dist/css/select2.min.css" rel="stylesheet">
    <!-- Switchery -->
    <link href="__STATIC__/switchery/dist/switchery.min.css" rel="stylesheet">
    <link href="__STATIC__/starrr/dist/starrr.css" rel="stylesheet">
</block>
<block name="body">
    <!-- page content -->
    <div class="right_col" role="main">
        <div class="">
            <div class="clearfix"></div>
            <div class="row">


                <div class="col-md-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>{$meta_title} <small>different form elements</small></h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a>
                                        </li>
                                        <li><a href="#">Settings 2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a>
                                </li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            <br />
                            <form action="{:U('')}" class="form1 form-horizontal form-label-left" method="post">
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">帐号*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <input type="text"  name="username"  value="{$info.username}" class="form-control" placeholder="请输入帐号" readonly="readonly" >
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">昵称名称*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <input type="text"  name="nickname"  value="{$info.nickname}" class="form-control" placeholder="请输入用户的昵称" >

                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">邮箱*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <input type="text"  name="email"  value="{$info.email}" class="form-control" placeholder="请输入用户的邮箱" readonly="readonly" >

                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <input type="text"  name="mobile"  value="{$info.mobile}" class="form-control" placeholder="请输入用户的手机号" readonly="readonly" >

                                    </div>
                                </div>
                                 <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">性别*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <select name='sex' class="form-control">
                                            <option value="男">男</option>
                                            <option value="女">女</option>
                                        </select>
                                                

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">生日*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                             <input type="text" name='birthday' value='{$info.birthday|time_format=###,'Y-m-d'}' class="form-control has-feedback-left" id="single_cal4" placeholder="请选择生日日期" aria-describedby="inputSuccess2Status4">
                                <span class="fa fa-calendar-o form-control-feedback left" aria-hidden="true"></span>

                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">qq*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                        <input type="text"  name="qq"  value="{$info.qq}" class="form-control" placeholder="请输入qq号码" >

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3 col-xs-12">用户头像*</label>
                                    <div class="col-md-9 col-sm-9 col-xs-12">
                                       
                                       <div class="upload_file-button" onclick="$('.select_image_upload').click();return false;"><!--点击上传图片-->
                                       </div>
                                       <div class="upload-img-box" onclick="$('.select_image_upload').click();return false;"><!--存放图片-->   
                                           <notempty name='info.logo'>
                                      <input type="hidden" name="logo" value="{$info.logo}">
                                      <img src="{$info.logo}" id="img_box" class="hei"> 
                                      <em class="edit_img_icon">&nbsp;</em>                              
                                    </notempty>
                                           
                                       </div>
                                       <input type="file" name="image" class="input-file select_image_upload" style="display: none;">

                                    </div>
                                </div>

                            
                               


                                <input type="hidden" name="id" value="{$info.id|default=''}">    
                               <input type="hidden" name="uid" value="{$info.uid|default=''}">  
                                <div class="ln_solid"></div>
                                <div class="form-group">
                                    <div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3">
                                        <a href="{:U('index')}" class="btn btn-primary">关闭</a>
                                        <button type="submit" class="btn btn-success">保存</button>
                                    </div>
                                </div>

                            </form>
                        </div>
                    </div>
                </div>






            </div>
        </div>
    </div>
</block>    
<block name='script'>
    <!-- iCheck -->
    <script src="__STATIC__/iCheck/icheck.min.js"></script>
    <!-- Select2 -->
    <script src="__STATIC__/select2/dist/js/select2.full.min.js"></script>
    <!-- jQuery Tags Input -->
    <script src="__STATIC__/jquery.tagsinput/src/jquery.tagsinput.js"></script>
    <!-- Switchery -->
    <script src="__STATIC__/switchery/dist/switchery.min.js"></script>
    <!-- jQuery autocomplete -->
    <script src="__STATIC__/devbridge-autocomplete/dist/jquery.autocomplete.min.js"></script>
    <!-- Autosize -->     
    <script src="__STATIC__/autosize/dist/autosize.min.js"></script>
    <!-- starrr -->
    <script src="__STATIC__/moment/moment.min.js"></script>
    <script src="__STATIC__/starrr/dist/starrr.js"></script>

  <script src="__STATIC__/datepicker/daterangepicker.js"></script>
    <!-- Select2 -->
    
    <!--上传-->
    
    
    
     <script type="text/javascript" src="__STATIC__/jquery-upload/js/jquery.iframe-transport.js" charset="utf-8"></script> 
       <script type="text/javascript" src="__STATIC__/jquery-upload/js/vendor/jquery.ui.widget.js" charset="utf-8"></script> 
    <script type="text/javascript" src="__STATIC__/jquery-upload/js/jquery.fileupload.min.js" charset="utf-8"></script>
    <script>
        var host_url="http://{$_SERVER['HTTP_HOST']}";
        var validator = {
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                 username: {
                    validators: {
                        notEmpty: {
                            message: '模型标识不能为空'
                        },
                        regexp: {
                            regexp: /^[a-z\_]+$/,
                            message: '只能填写字符'
                        }
                    }
                },
                nickname: {
                    validators: {
                        notEmpty: {
                            message: '模型名称不能为空'
                        }
                    }
                },
                nickname: {
                    validators: {
                        notEmpty: {
                            message: '模型名称不能为空'
                        }
                    }
                }
               
             
            }
        };
        
        
        
        
        
                $(".select_image_upload").fileupload({
                                      dataType: 'json',
                                      url: '{:U('File/uploadPicture')}',
                                      formData: {},
                                      add: function (e, data) {
                                          data.submit();
                                      },
                                      done: function (e, data) {
                                          var param = data.result;
                                          if (param.code == 1) {
                                              
                                              $(this).parent().find(".upload-img-box").html('<input type="hidden" name="logo" value="'+host_url+param.data.path+'"  /><img src="'+param.data.path+'"  id="img_box1" class="hei"> <em class="edit_img_icon">&nbsp;</em>');
                                           
                                       } else {
                                              ui.error(param.msg);
                                          }

                                      }
                                  });
        $(document).ready(function () {
            $(".select2_single").select2({
                placeholder: "Select a state",
                allowClear: true
            });
            $(".select2_group").select2({});
            $(".select2_multiple").select2({
                maximumSelectionLength: 4,
                placeholder: "With Max Selection limit 4",
                allowClear: true
            });
        });</script>
    <!-- /Select2 -->

    <!-- jQuery Tags Input -->
    <script>
        function onAddTag(tag) {
            alert("Added a tag: " + tag);
        }

        function onRemoveTag(tag) {
            alert("Removed a tag: " + tag);
        }

        function onChangeTag(input, tag) {
            alert("Changed a tag: " + tag);
        }

        $(document).ready(function () {
            $('#tags_1').tagsInput({
                width: 'auto'
            });
        });</script>
    <!-- /jQuery Tags Input -->


    <!-- Autosize -->
    <script>
        $(document).ready(function () {
            autosize($('.resizable_textarea'));
        });</script>
    <!-- /Autosize -->

    <!-- jQuery autocomplete -->
    <script>
        $(document).ready(function () {
            var countries = {AD: "Andorra", A2: "Andorra Test", AE: "United Arab Emirates", AF: "Afghanistan", AG: "Antigua and Barbuda", AI: "Anguilla", AL: "Albania", AM: "Armenia", AN: "Netherlands Antilles", AO: "Angola", AQ: "Antarctica", AR: "Argentina", AS: "American Samoa", AT: "Austria", AU: "Australia", AW: "Aruba", AX: "Åland Islands", AZ: "Azerbaijan", BA: "Bosnia and Herzegovina", BB: "Barbados", BD: "Bangladesh", BE: "Belgium", BF: "Burkina Faso", BG: "Bulgaria", BH: "Bahrain", BI: "Burundi", BJ: "Benin", BL: "Saint Barthélemy", BM: "Bermuda", BN: "Brunei", BO: "Bolivia", BQ: "British Antarctic Territory", BR: "Brazil", BS: "Bahamas", BT: "Bhutan", BV: "Bouvet Island", BW: "Botswana", BY: "Belarus", BZ: "Belize", CA: "Canada", CC: "Cocos [Keeling] Islands", CD: "Congo - Kinshasa", CF: "Central African Republic", CG: "Congo - Brazzaville", CH: "Switzerland", CI: "Côte d’Ivoire", CK: "Cook Islands", CL: "Chile", CM: "Cameroon", CN: "China", CO: "Colombia", CR: "Costa Rica", CS: "Serbia and Montenegro", CT: "Canton and Enderbury Islands", CU: "Cuba", CV: "Cape Verde", CX: "Christmas Island", CY: "Cyprus", CZ: "Czech Republic", DD: "East Germany", DE: "Germany", DJ: "Djibouti", DK: "Denmark", DM: "Dominica", DO: "Dominican Republic", DZ: "Algeria", EC: "Ecuador", EE: "Estonia", EG: "Egypt", EH: "Western Sahara", ER: "Eritrea", ES: "Spain", ET: "Ethiopia", FI: "Finland", FJ: "Fiji", FK: "Falkland Islands", FM: "Micronesia", FO: "Faroe Islands", FQ: "French Southern and Antarctic Territories", FR: "France", FX: "Metropolitan France", GA: "Gabon", GB: "United Kingdom", GD: "Grenada", GE: "Georgia", GF: "French Guiana", GG: "Guernsey", GH: "Ghana", GI: "Gibraltar", GL: "Greenland", GM: "Gambia", GN: "Guinea", GP: "Guadeloupe", GQ: "Equatorial Guinea", GR: "Greece", GS: "South Georgia and the South Sandwich Islands", GT: "Guatemala", GU: "Guam", GW: "Guinea-Bissau", GY: "Guyana", HK: "Hong Kong SAR China", HM: "Heard Island and McDonald Islands", HN: "Honduras", HR: "Croatia", HT: "Haiti", HU: "Hungary", ID: "Indonesia", IE: "Ireland", IL: "Israel", IM: "Isle of Man", IN: "India", IO: "British Indian Ocean Territory", IQ: "Iraq", IR: "Iran", IS: "Iceland", IT: "Italy", JE: "Jersey", JM: "Jamaica", JO: "Jordan", JP: "Japan", JT: "Johnston Island", KE: "Kenya", KG: "Kyrgyzstan", KH: "Cambodia", KI: "Kiribati", KM: "Comoros", KN: "Saint Kitts and Nevis", KP: "North Korea", KR: "South Korea", KW: "Kuwait", KY: "Cayman Islands", KZ: "Kazakhstan", LA: "Laos", LB: "Lebanon", LC: "Saint Lucia", LI: "Liechtenstein", LK: "Sri Lanka", LR: "Liberia", LS: "Lesotho", LT: "Lithuania", LU: "Luxembourg", LV: "Latvia", LY: "Libya", MA: "Morocco", MC: "Monaco", MD: "Moldova", ME: "Montenegro", MF: "Saint Martin", MG: "Madagascar", MH: "Marshall Islands", MI: "Midway Islands", MK: "Macedonia", ML: "Mali", MM: "Myanmar [Burma]", MN: "Mongolia", MO: "Macau SAR China", MP: "Northern Mariana Islands", MQ: "Martinique", MR: "Mauritania", MS: "Montserrat", MT: "Malta", MU: "Mauritius", MV: "Maldives", MW: "Malawi", MX: "Mexico", MY: "Malaysia", MZ: "Mozambique", NA: "Namibia", NC: "New Caledonia", NE: "Niger", NF: "Norfolk Island", NG: "Nigeria", NI: "Nicaragua", NL: "Netherlands", NO: "Norway", NP: "Nepal", NQ: "Dronning Maud Land", NR: "Nauru", NT: "Neutral Zone", NU: "Niue", NZ: "New Zealand", OM: "Oman", PA: "Panama", PC: "Pacific Islands Trust Territory", PE: "Peru", PF: "French Polynesia", PG: "Papua New Guinea", PH: "Philippines", PK: "Pakistan", PL: "Poland", PM: "Saint Pierre and Miquelon", PN: "Pitcairn Islands", PR: "Puerto Rico", PS: "Palestinian Territories", PT: "Portugal", PU: "U.S. Miscellaneous Pacific Islands", PW: "Palau", PY: "Paraguay", PZ: "Panama Canal Zone", QA: "Qatar", RE: "Réunion", RO: "Romania", RS: "Serbia", RU: "Russia", RW: "Rwanda", SA: "Saudi Arabia", SB: "Solomon Islands", SC: "Seychelles", SD: "Sudan", SE: "Sweden", SG: "Singapore", SH: "Saint Helena", SI: "Slovenia", SJ: "Svalbard and Jan Mayen", SK: "Slovakia", SL: "Sierra Leone", SM: "San Marino", SN: "Senegal", SO: "Somalia", SR: "Suriname", ST: "São Tomé and Príncipe", SU: "Union of Soviet Socialist Republics", SV: "El Salvador", SY: "Syria", SZ: "Swaziland", TC: "Turks and Caicos Islands", TD: "Chad", TF: "French Southern Territories", TG: "Togo", TH: "Thailand", TJ: "Tajikistan", TK: "Tokelau", TL: "Timor-Leste", TM: "Turkmenistan", TN: "Tunisia", TO: "Tonga", TR: "Turkey", TT: "Trinidad and Tobago", TV: "Tuvalu", TW: "Taiwan", TZ: "Tanzania", UA: "Ukraine", UG: "Uganda", UM: "U.S. Minor Outlying Islands", US: "United States", UY: "Uruguay", UZ: "Uzbekistan", VA: "Vatican City", VC: "Saint Vincent and the Grenadines", VD: "North Vietnam", VE: "Venezuela", VG: "British Virgin Islands", VI: "U.S. Virgin Islands", VN: "Vietnam", VU: "Vanuatu", WF: "Wallis and Futuna", WK: "Wake Island", WS: "Samoa", YD: "People's Democratic Republic of Yemen", YE: "Yemen", YT: "Mayotte", ZA: "South Africa", ZM: "Zambia", ZW: "Zimbabwe", ZZ: "Unknown or Invalid Region"};
            var countriesArray = $.map(countries, function (value, key) {
                return {
                    value: value,
                    data: key
                };
            });
            // initialize autocomplete with custom appendTo
            $('#autocomplete-custom-append').autocomplete({
                lookup: countriesArray
            });
        });</script>
    <!-- /jQuery autocomplete -->

    <!-- Starrr -->
    <script>
        $(document).ready(function () {
            $(".stars").starrr();
            $('.stars-existing').starrr({
                rating: 4
            });
            $('.stars').on('starrr:change', function (e, value) {
                $('.stars-count').html(value);
            });
            $('.stars-existing').on('starrr:change', function (e, value) {
                $('.stars-count-existing').html(value);
            });
            
            $('#single_cal4').daterangepicker({
                 format: 'YYYY-MM-DD',
           "singleDatePicker": true,
    "showDropdowns": true,
    "showWeekNumbers": true,
    "showISOWeekNumbers": true,


    "autoApply": true,
          calender_style: "picker_2"
        }, function(start, end, label) {
          console.log(start.toISOString(), end.toISOString(), label);
        });
        });
         Lzy.highlight_subnav("{:U('Users/index')}");
    </script>
</block>    